// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_FIN_BILLING
// * CreateDate    : 2014-06-05 18:29:47
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:29:47
// * LastChanger   : 2014-06-05 18:29:47
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class FinBillingEntity : EntityBase
    {
        public FinBillingTable TableSchema
        {
            get
            {
                return FinBillingTable.Current;
            }
		}
		
		public FinBillingEntity()
        {

        }
		
		public FinBillingEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.BillingId = Convert.ToString(CommonFunctions.ToObject(dr["BILLING_ID"]));
			this.BillingCode = Convert.ToString(CommonFunctions.ToObject(dr["BILLING_CODE"]));
			this.BillingPerson = Convert.ToString(CommonFunctions.ToObject(dr["BILLING_PERSON"]));
			this.BillingDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["BILLING_DATE"]));
			this.SupplierId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ID"]));
			this.BillingAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["BILLING_AMOUNT"]));
			this.Currency = Convert.ToString(CommonFunctions.ToObject(dr["CURRENCY"]));
			this.InvoiceNo = Convert.ToString(CommonFunctions.ToObject(dr["INVOICE_NO"]));
			this.CompanyTitle = Convert.ToString(CommonFunctions.ToObject(dr["COMPANY_TITLE"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.PayType = Convert.ToString(CommonFunctions.ToObject(dr["PAY_TYPE"]));
			this.OrderType = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_TYPE"]));
			this.BillingType = Convert.ToString(CommonFunctions.ToObject(dr["BILLING_TYPE"]));
        }
		
		public FinBillingEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.BillingId = Convert.ToString(CommonFunctions.ToObject(dr["BILLING_ID"]));
			this.BillingCode = Convert.ToString(CommonFunctions.ToObject(dr["BILLING_CODE"]));
			this.BillingPerson = Convert.ToString(CommonFunctions.ToObject(dr["BILLING_PERSON"]));
			this.BillingDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["BILLING_DATE"]));
			this.SupplierId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ID"]));
			this.BillingAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["BILLING_AMOUNT"]));
			this.Currency = Convert.ToString(CommonFunctions.ToObject(dr["CURRENCY"]));
			this.InvoiceNo = Convert.ToString(CommonFunctions.ToObject(dr["INVOICE_NO"]));
			this.CompanyTitle = Convert.ToString(CommonFunctions.ToObject(dr["COMPANY_TITLE"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.PayType = Convert.ToString(CommonFunctions.ToObject(dr["PAY_TYPE"]));
			this.OrderType = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_TYPE"]));
			this.BillingType = Convert.ToString(CommonFunctions.ToObject(dr["BILLING_TYPE"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return FinBillingTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string BillingId
        {
            get { return Convert.ToString(GetData(FinBillingTable.C_BILLING_ID)); }
            set { SetData(FinBillingTable.C_BILLING_ID, value); }
        }
		
        [DataMember]
        public string BillingCode
        {
            get { return Convert.ToString(GetData(FinBillingTable.C_BILLING_CODE)); }
            set { SetData(FinBillingTable.C_BILLING_CODE, value); }
        }
		
        [DataMember]
        public string BillingPerson
        {
            get { return Convert.ToString(GetData(FinBillingTable.C_BILLING_PERSON)); }
            set { SetData(FinBillingTable.C_BILLING_PERSON, value); }
        }
		
        [DataMember]
        public DateTime BillingDate
        {
            get { return Convert.ToDateTime(GetData(FinBillingTable.C_BILLING_DATE)); }
            set { SetData(FinBillingTable.C_BILLING_DATE, value); }
        }
		
        [DataMember]
        public string SupplierId
        {
            get { return Convert.ToString(GetData(FinBillingTable.C_SUPPLIER_ID)); }
            set { SetData(FinBillingTable.C_SUPPLIER_ID, value); }
        }
		
        [DataMember]
        public decimal BillingAmount
        {
            get { return Convert.ToDecimal(GetData(FinBillingTable.C_BILLING_AMOUNT)); }
            set { SetData(FinBillingTable.C_BILLING_AMOUNT, value); }
        }
		
        [DataMember]
        public string Currency
        {
            get { return Convert.ToString(GetData(FinBillingTable.C_CURRENCY)); }
            set { SetData(FinBillingTable.C_CURRENCY, value); }
        }
		
        [DataMember]
        public string InvoiceNo
        {
            get { return Convert.ToString(GetData(FinBillingTable.C_INVOICE_NO)); }
            set { SetData(FinBillingTable.C_INVOICE_NO, value); }
        }
		
        [DataMember]
        public string CompanyTitle
        {
            get { return Convert.ToString(GetData(FinBillingTable.C_COMPANY_TITLE)); }
            set { SetData(FinBillingTable.C_COMPANY_TITLE, value); }
        }
		
        [DataMember]
        public string Status
        {
            get { return Convert.ToString(GetData(FinBillingTable.C_STATUS)); }
            set { SetData(FinBillingTable.C_STATUS, value); }
        }
		
        [DataMember]
        public string Remark
        {
            get { return Convert.ToString(GetData(FinBillingTable.C_REMARK)); }
            set { SetData(FinBillingTable.C_REMARK, value); }
        }
		
        [DataMember]
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(FinBillingTable.C_CREATED_DATE)); }
            set { SetData(FinBillingTable.C_CREATED_DATE, value); }
        }
		
        [DataMember]
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(FinBillingTable.C_CREATED_BY)); }
            set { SetData(FinBillingTable.C_CREATED_BY, value); }
        }
		
        [DataMember]
        public DateTime LastModifiedDate
        {
            get { return Convert.ToDateTime(GetData(FinBillingTable.C_LAST_MODIFIED_DATE)); }
            set { SetData(FinBillingTable.C_LAST_MODIFIED_DATE, value); }
        }
		
        [DataMember]
        public string LastModifiedBy
        {
            get { return Convert.ToString(GetData(FinBillingTable.C_LAST_MODIFIED_BY)); }
            set { SetData(FinBillingTable.C_LAST_MODIFIED_BY, value); }
        }
		
        [DataMember]
        public DateTime ApprovedDate
        {
            get { return Convert.ToDateTime(GetData(FinBillingTable.C_APPROVED_DATE)); }
            set { SetData(FinBillingTable.C_APPROVED_DATE, value); }
        }
		
        [DataMember]
        public string ApprovedBy
        {
            get { return Convert.ToString(GetData(FinBillingTable.C_APPROVED_BY)); }
            set { SetData(FinBillingTable.C_APPROVED_BY, value); }
        }
		
        [DataMember]
        public string PayType
        {
            get { return Convert.ToString(GetData(FinBillingTable.C_PAY_TYPE)); }
            set { SetData(FinBillingTable.C_PAY_TYPE, value); }
        }
		
        [DataMember]
        public string OrderType
        {
            get { return Convert.ToString(GetData(FinBillingTable.C_ORDER_TYPE)); }
            set { SetData(FinBillingTable.C_ORDER_TYPE, value); }
        }
		
        [DataMember]
        public string BillingType
        {
            get { return Convert.ToString(GetData(FinBillingTable.C_BILLING_TYPE)); }
            set { SetData(FinBillingTable.C_BILLING_TYPE, value); }
        }
		
		#endregion
	}
	
	
}	

